package tt.dz.appserver.entity.model;

import java.io.Serializable;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * 返回数据映射帮助实体
 * 
 * @author 谢龙飞
 *
 */
public class ResultMappingEntity implements Serializable{

	private static final long serialVersionUID = 1L;
	
	// 响应码
	private String code;
	// 提醒信息
	private String msg;
	// 数据集合
	private Object data;

	public ResultMappingEntity() {
		super();
	}

	public ResultMappingEntity(String code, String msg, Object data) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	// SerializerFeature.WriteMapNullValue
	@Override
	public String toString() {
		return JSON.toJSONString(this, SerializerFeature.SortField, SerializerFeature.WriteDateUseDateFormat,
				SerializerFeature.WriteNullListAsEmpty, SerializerFeature.WriteNullNumberAsZero,
				SerializerFeature.BrowserCompatible);
	}
}
